<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript">
		var re = new RegExp('a','i'); //i忽略大小写
		var str='Asbcde';

		alert(str.search(re));
	</script>
</head>
<body>
	
</body>
</html>